package org.pillar.fitness.course.domain.vo;

import org.pillar.fitness.common.annotation.Excel;
import org.pillar.fitness.common.core.domain.BaseEntity;
import org.pillar.fitness.course.validator.CreateGroup;
import org.pillar.fitness.course.validator.EditGroup;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

public class CourseVo extends BaseEntity {
    /**
     * 课程ID
     */
    @NotNull(message = "{course.id.notnull}", groups = EditGroup.class)
    @Excel(name = "课程编号")
    private Integer courseId;

    /**
     * 课程类型 1 舞蹈类 2  游泳类 3 拳击类
     */
    @NotNull(message = "{course.type.notnull}", groups = {CreateGroup.class, EditGroup.class})
    @Excel(name = "课程类型", readConverterExp = "1=舞蹈类,2=游泳类,3=拳击类")
    private Integer type;

    /**
     * 课程名字
     */
    @NotBlank(message = "{course.name.notblank}", groups = {CreateGroup.class, EditGroup.class})   //不能为空 也不能为空字符串
    @Excel(name = "课程名称")
    private String name;

    /**
     * 课程价格
     */
    @NotNull(message = "{course.price.notnull}", groups = {CreateGroup.class, EditGroup.class})
    @Min(value = 0, message = "{course.price.invalid}", groups = {CreateGroup.class, EditGroup.class})
    @Excel(name = "课程价格")
    private Double price;

    /**
     * 课程适用人群
     */
    @NotNull(message = "{course.applyTo.notnull}", groups = {CreateGroup.class, EditGroup.class})
    @Excel(name = "课程适用人群", readConverterExp = "1=中小学生,2=上班族,3=新手小白,4=健身达人")
    private Integer applyTo;

    /**
     * 课程简介
     */
    @NotBlank(message = "{course.info.notblank}", groups = {CreateGroup.class, EditGroup.class})
    @Excel(name = "课程简介")
    private String info;

    /**
     * 课程备注
     */
    @Excel(name = "课程备注")
    private String remark;

    public Integer getCourseId() {
        return courseId;
    }

    public void setCourseId(Integer courseId) {
        this.courseId = courseId;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public Integer getApplyTo() {
        return applyTo;
    }

    public void setApplyTo(Integer applyTo) {
        this.applyTo = applyTo;
    }

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }

    @Override
    public String getRemark() {
        return remark;
    }

    @Override
    public void setRemark(String remark) {
        this.remark = remark;
    }
}
